package com.xbongbong.admin.domain.dao;

import com.xbongbong.admin.domain.entity.WorkOrderTemplateRetainEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author guohui.zhang
 * @Title: 工单模板
 * @date 2020/3/1914:43
 */
@Repository
@Mapper
public interface WorkOrderTemplateRetainDao {

    List<WorkOrderTemplateRetainEntity> findEntitys(@Param("param") Map<String, Object> param);

    /**
     * 批量删除
     * @param list 主键id集合
     * @param corpid
     * @author xingxing.xiao
     */
    Integer deleteBatch(@Param("list") List<Long> list, @Param("corpid") String corpid);

    /**
     * 批量插入实体
     * @param list
     * @return 返回数据的列表
     */
    Integer insertBatch(@Param("list") List<WorkOrderTemplateRetainEntity> list);

    /**
     * 根据appID删除
     * @param appId
     * @param corpid
     * @return
     */
    Integer deleteByAppId(@Param("appId") Long appId, @Param("corpid") String corpid);


    /**
     * 工单模板批量修改
     * @param workOrderTemplateEntities
     * @param corpid
     */
    Integer updateBatch(@Param("list") List<WorkOrderTemplateRetainEntity> workOrderTemplateEntities, @Param("corpid") String corpid);

}
